package com.zhou.bpm.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * @Author: zhoujinchuan
 * @Description: TODO（请添加描述）
 * @CreateTime: 2023/10/25 9:35
 */
@Data
@TableName(value = "bpm_task")
public class BpmTask {
    private static final long serialVersionUID=1L;

    @ApiModelProperty("主键")
    @JsonSerialize(using = ToStringSerializer.class)
    @TableId(type = IdType.AUTO, value = "id")
    private Integer id;

    @ApiModelProperty("任务id")
    @TableField(value = "task_id")
    private String taskId;

    @ApiModelProperty("流程实例id")
    @JsonSerialize(using = ToStringSerializer.class)
    @TableField(value = "instance_id")
    private Integer instanceId;

    @ApiModelProperty("流程编码")
    @TableField(value = "process_code")
    private String processCode;

    @ApiModelProperty("节点编码")
    @TableField(value = "node_code")
    private String nodeCode;

    @ApiModelProperty("实际审批人（抢签使用）")
    @TableField(value = "actual_approver")
    private Integer actualApprover;

    @ApiModelProperty("实际审批人名称（抢签使用）")
    @TableField(value = "actual_approver_name")
    private String actualApproverName;

    @ApiModelProperty("审批动作：0-流程发起,1-默认值无意义,2-审批通过,3-退回上一节点,4-退回申请人节点,5-路由任意节点,6-发起人测回,7-发起人作废")
    @TableField(value = "action")
    private String action;

    @ApiModelProperty("待办生成时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    @ApiModelProperty("待办处理时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;

    @ApiModelProperty("删除标识")
    @TableLogic(delval = "1",value = "0")
    private String isDelete;

}
